package com.whj.serviceorder.remote;

import com.whj.internalcommon.dto.PriceRules;
import com.whj.internalcommon.dto.ResponseResult;
import com.whj.internalcommon.request.PriceRulesNewRequest;
import javafx.geometry.Pos;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/30 - 01 - 30 - 15:42 
 * @Description: com.whj.serviceorder.remote
 */

@FeignClient("service-price")
public interface ServicePriceClient {

    @RequestMapping(method = RequestMethod.GET, value = "/price-rules/if-exists")
    ResponseResult<Boolean> ifExists(@RequestBody PriceRules priceRules);

    @RequestMapping(method = RequestMethod.POST, value = "/price-rules/is-new")
    ResponseResult<Boolean> getVersionIsNew(@RequestBody PriceRulesNewRequest priceRulesNewRequest);

    @RequestMapping(method = RequestMethod.POST,value = "/calculate-price")
    ResponseResult<Double> calculatePrice(@RequestParam Integer distance, @RequestParam Integer duration ,
                                  @RequestParam String cityCode, @RequestParam String vehicleType);
}
